package com.amusement.threePoker.control
{
	import com.amusement.threePoker.model.DeskMenu;
	import com.amusement.threePoker.view.Room;

	public class RoomControl
	{
		public static var instance:RoomControl;
		private var room:Room;
		public function RoomControl(room:Room)
		{
			this.room = room;
			instance = this;
		}
		
		public function init(rooms:Array):void{
			for(var i:int=0;i<rooms.length;i++){
				var deskMenu:DeskMenu = new DeskMenu();
				this.room.addElement(deskMenu);
				
				deskMenu.x = i%4 * 255;
				deskMenu.y = int(i/4) * 150;
				
				trace(deskMenu.x + ":" +deskMenu.y);
			}
		}
	}
}